using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableEXWarehouseGoods
	{
		public const string Table = "EXWarehouseGoods";
		public const string EXWarehouseGoodsID = "EXWarehouseGoodsID";
		public const string EXWarehouseID = "EXWarehouseID";
		public const string VegetablesID = "VegetablesID";
		public const string OrderItemID = "OrderItemID";
		public const string SalesGuidePrice = "SalesGuidePrice";
		public const string TotalQty = "TotalQty";
		public const string VegetablesName = "VegetablesName";
		public const string VegetablesNo = "VegetablesNo";
		public const string Description = "Description";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
	}
	
	[Serializable]
	public class BaseEXWarehouseGoods
		: IDbSessionEntity, IJsonClass
	{
		int m_EXWarehouseGoodsID;
		/// <summary>
        /// 出库商品表ID
        /// </summary>
        public int EXWarehouseGoodsID
        {
            get { return m_EXWarehouseGoodsID; }
            set { m_EXWarehouseGoodsID = value; }
        }
		
		int? m_EXWarehouseID;
		/// <summary>
        /// 出库表ID
        /// </summary>
        public int? EXWarehouseID
        {
            get { return m_EXWarehouseID; }
            set { m_EXWarehouseID = value; }
        }
		
		int? m_VegetablesID;
		/// <summary>
        /// 蔬菜信息表ID
        /// </summary>
        public int? VegetablesID
        {
            get { return m_VegetablesID; }
            set { m_VegetablesID = value; }
        }
		
		int m_OrderItemID;
		/// <summary>
        /// 订单项目表ID
        /// </summary>
        public int OrderItemID
        {
            get { return m_OrderItemID; }
            set { m_OrderItemID = value; }
        }
		
		double m_SalesGuidePrice;
		/// <summary>
        /// 销售价
        /// </summary>
        public double SalesGuidePrice
        {
            get { return m_SalesGuidePrice; }
            set { m_SalesGuidePrice = value; }
        }
		
		double m_TotalQty;
		/// <summary>
        /// 总数量
        /// </summary>
        public double TotalQty
        {
            get { return m_TotalQty; }
            set { m_TotalQty = value; }
        }
		
		string m_VegetablesName;
		/// <summary>
        /// 蔬菜名称
        /// </summary>
        public string VegetablesName
        {
            get { return m_VegetablesName; }
            set { m_VegetablesName = value; }
        }
		
		string m_VegetablesNo;
		/// <summary>
        /// 商品编号
        /// </summary>
        public string VegetablesNo
        {
            get { return m_VegetablesNo; }
            set { m_VegetablesNo = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 备注说明
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 创建人ID
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 创建人名称
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 修改人
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 修改人ID
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_EXWarehouseGoodsID = reader[TableEXWarehouseGoods.EXWarehouseGoodsID];
            m_EXWarehouseID = reader[TableEXWarehouseGoods.EXWarehouseID];
            m_VegetablesID = reader[TableEXWarehouseGoods.VegetablesID];
            m_OrderItemID = reader[TableEXWarehouseGoods.OrderItemID];
            m_SalesGuidePrice = reader[TableEXWarehouseGoods.SalesGuidePrice];
            m_TotalQty = reader[TableEXWarehouseGoods.TotalQty];
            m_VegetablesName = reader[TableEXWarehouseGoods.VegetablesName];
            m_VegetablesNo = reader[TableEXWarehouseGoods.VegetablesNo];
            m_Description = reader[TableEXWarehouseGoods.Description];
            m_Creater = reader[TableEXWarehouseGoods.Creater];
            m_CreatedBy = reader[TableEXWarehouseGoods.CreatedBy];
            m_Created = reader[TableEXWarehouseGoods.Created];
            m_Modified = reader[TableEXWarehouseGoods.Modified];
            m_ModifiedBy = reader[TableEXWarehouseGoods.ModifiedBy];
            m_ModifiedByID = reader[TableEXWarehouseGoods.ModifiedByID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableEXWarehouseGoods.EXWarehouseGoodsID, PrimaryKeyType.Identity, EXWarehouseGoodsID);
			writer[TableEXWarehouseGoods.EXWarehouseID] = EXWarehouseID;
			writer[TableEXWarehouseGoods.VegetablesID] = VegetablesID;
			writer[TableEXWarehouseGoods.OrderItemID] = OrderItemID;
			writer[TableEXWarehouseGoods.SalesGuidePrice] = SalesGuidePrice;
			writer[TableEXWarehouseGoods.TotalQty] = TotalQty;
			writer[TableEXWarehouseGoods.VegetablesName] = VegetablesName;
			writer[TableEXWarehouseGoods.VegetablesNo] = VegetablesNo;
			writer[TableEXWarehouseGoods.Description] = Description;
			writer[TableEXWarehouseGoods.Creater] = Creater;
			writer[TableEXWarehouseGoods.CreatedBy] = CreatedBy;
			writer[TableEXWarehouseGoods.Created] = Created;
			writer[TableEXWarehouseGoods.Modified] = Modified;
			writer[TableEXWarehouseGoods.ModifiedBy] = ModifiedBy;
			writer[TableEXWarehouseGoods.ModifiedByID] = ModifiedByID;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_EXWarehouseGoodsID = idd;
        }
		
		public string TableName
        {
            get { return TableEXWarehouseGoods.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_EXWarehouseGoodsID = hashToRead["EXWarehouseGoodsID"];
			 
             m_EXWarehouseID = hashToRead["EXWarehouseID"];
			 
             m_VegetablesID = hashToRead["VegetablesID"];
			 
             m_OrderItemID = hashToRead["OrderItemID"];
			 
             m_SalesGuidePrice = hashToRead["SalesGuidePrice"];
			 
             m_TotalQty = hashToRead["TotalQty"];
			 
             m_VegetablesName = hashToRead["VegetablesName"];
			 
             m_VegetablesNo = hashToRead["VegetablesNo"];
			 
             m_Description = hashToRead["Description"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["EXWarehouseGoodsID"] = EXWarehouseGoodsID;
			 
            hashToFill["EXWarehouseID"] = EXWarehouseID;
			 
            hashToFill["VegetablesID"] = VegetablesID;
			 
            hashToFill["OrderItemID"] = OrderItemID;
			 
            hashToFill["SalesGuidePrice"] = SalesGuidePrice;
			 
            hashToFill["TotalQty"] = TotalQty;
			 
            hashToFill["VegetablesName"] = VegetablesName;
			 
            hashToFill["VegetablesNo"] = VegetablesNo;
			 
            hashToFill["Description"] = Description;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
        }

        #endregion
		
	}
}
